﻿using System;
using System.ComponentModel;

namespace WaitLess.App
{
    public class MunicipalOfficeViewModel : INotifyPropertyChanged
    {
        private string _id;
        public string Id
        {
            get
            {
                return _id;
            }
            set
            {
                if (value != _id)
                {
                    _id = value;
                    NotifyPropertyChanged("Id");
                }
            }
        }

        private string _title;
        public string Title
        {
            get
            {
                return _title;
            }
            set
            {
                if (value != _title)
                {
                    _title = value;
                    NotifyPropertyChanged("Title");
                }
            }
        }

        private string _district;
        public string District
        {
            get
            {
                return _district;
            }
            set
            {
                if (value != _district)
                {
                    _district = value;
                    NotifyPropertyChanged("District");
                }
            }
        }

        public string Longitude { get; set; }
        public string Latitude { get; set; }

        public event PropertyChangedEventHandler PropertyChanged;
        private void NotifyPropertyChanged(String propertyName)
        {
            PropertyChangedEventHandler handler = PropertyChanged;
            if (null != handler)
            {
                handler(this, new PropertyChangedEventArgs(propertyName));
            }
        }
    }
}